package com.lkz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class Employee extends BaseEntity{
    private static final long serialVersionUID = 1L;
    @TableId(value = "emp_id", type = IdType.AUTO)
    private Integer empId;
    private String empName;
    private String pwd;
    private String salt;
    private Integer age;
    private String sex;
    private String phone;
    private String address;
    @TableField(exist = false)
    private List<Role> roleList;
    public String getCredentialsSalt(){
        return this.empName+this.salt;
    }

}
